package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.LoginDto;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/login")
public class ApUserController {

    @Autowired
    private ApUserService apUserService;

    @PostMapping("/login_auth")
    public ResponseResult<ApUser> userLogin(@RequestBody LoginDto loginDto){
        return apUserService.userLogin(loginDto);
    }

    @GetMapping("/test")
    public ResponseResult test(){
        return ResponseResult.okResult("test方法执行完成！！！");
    }

}
